package com.zhijiang.hospital.controller;
//package com.zhijiang.hospital.controller;
//

import cn.hutool.core.util.IdcardUtil;
import com.zhijiang.config.webConfig.PassToken;
import com.zhijiang.hospital.entity.Checkin;
import com.zhijiang.hospital.entity.dto.EmployeeArrangerClassDto;
import com.zhijiang.hospital.mapper.AisOperRegDtoMapper;
import com.zhijiang.hospital.mapper.CheckinMapper;
import com.zhijiang.hospital.mapper.ComDeptBedsnumMapper;
import com.zhijiang.hospital.mapper.EmployeeArrangerClassDtoMapper;
import com.zhijiang.hospital.mapper.EmployeeDtoMapper;
import com.zhijiang.hospital.mapper.FinIpbItemlistDtoMapper;
import com.zhijiang.hospital.mapper.FinOpbFeedetailDtoMapper;
import com.zhijiang.hospital.mapper.PhaComInputDtoMapper;
import com.zhijiang.hospital.mapper.PhaComOutputDtoMapper;
import com.zhijiang.hospital.mapper.UserMapper;
import com.zhijiang.hospital.service.AisOperRegDtoService;
import com.zhijiang.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 75936
 * @version 1.0
 * @project zhijiang_hospital_data
 * @description
 * @date 2023-01-05 10:38:39
 */
@RestController
@RequestMapping("test")
public class TestController {
    @Autowired
    AisOperRegDtoMapper aisOperRegDtoMapper;
    @Autowired
    ComDeptBedsnumMapper comDeptBedsnumMapper;
    @Autowired
    FinOpbFeedetailDtoMapper finOpbFeedetailDtoMapper;
    @Autowired
    FinIpbItemlistDtoMapper finIpbItemlistDtoMapper;
    @Autowired
    PhaComOutputDtoMapper phaComOutputDtoMapper;
    @Autowired
    PhaComInputDtoMapper phaComInputDtoMapper;
    @Autowired
    AisOperRegDtoService aisOperRegDtoService;
    @Autowired
    EmployeeDtoMapper employeeDtoMapper;
    @Autowired
    UserMapper userMapper;
    @Autowired
    private EmployeeArrangerClassDtoMapper employeeArrangerClassDtoMapper;
    @Autowired
    CheckinMapper checkinMapper;


    @GetMapping("all")
    @PassToken
    public Result findAll(String squenceTime, String empName) {
        //List<ArrangerClass> arrangerClass = arrangerClassMapper.getArrangerClass(squenceTime, empName);
        //return Result.ok(arrangerClass);
        List<EmployeeArrangerClassDto> employeeArrangerClassDtos = employeeArrangerClassDtoMapper.getEmployeeArrangerClassDtos();
        return Result.ok(employeeArrangerClassDtos);
    }

    //@GetMapping("findAll")
    //public Result test01(String day){
    //    //List<AisOperRegVo> yearDataDay = (List<AisOperRegVo>) lastYearDataDay
    //    return Result.ok(aisOperRegDtoService.getAisOperRegData(day));
    //}
    public static void main(String[] args) {
        int ageByIdCard = IdcardUtil.getAgeByIdCard("420621199009053339");
        System.out.println(ageByIdCard);
        int genderByIdCard = IdcardUtil.getGenderByIdCard("420621199809053379");
        System.out.println(genderByIdCard);
    }

    @PostMapping("test01")
    public Result test01(@RequestBody Checkin checkin) {
        return null;
    }


}
